package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.InvoiceRecordsAuditMapper;
import com.ruoyi.system.domain.InvoiceRecordsAudit;
import com.ruoyi.system.service.IInvoiceRecordsAuditService;

/**
 * 中心库月结审计Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-28
 */
@Service
public class InvoiceRecordsAuditServiceImpl implements IInvoiceRecordsAuditService 
{
    @Autowired
    private InvoiceRecordsAuditMapper invoiceRecordsAuditMapper;

    /**
     * 查询中心库月结审计
     * 
     * @param id 中心库月结审计主键
     * @return 中心库月结审计
     */
    @Override
    public InvoiceRecordsAudit selectInvoiceRecordsAuditById(Long id)
    {
        return invoiceRecordsAuditMapper.selectInvoiceRecordsAuditById(id);
    }

    /**
     * 查询中心库月结审计列表
     * 
     * @param invoiceRecordsAudit 中心库月结审计
     * @return 中心库月结审计
     */
    @Override
    public List<InvoiceRecordsAudit> selectInvoiceRecordsAuditList(InvoiceRecordsAudit invoiceRecordsAudit)
    {
        return invoiceRecordsAuditMapper.selectInvoiceRecordsAuditList(invoiceRecordsAudit);
    }

    /**
     * 新增中心库月结审计
     * 
     * @param invoiceRecordsAudit 中心库月结审计
     * @return 结果
     */
    @Override
    public int insertInvoiceRecordsAudit(InvoiceRecordsAudit invoiceRecordsAudit)
    {
        return invoiceRecordsAuditMapper.insertInvoiceRecordsAudit(invoiceRecordsAudit);
    }

    /**
     * 修改中心库月结审计
     * 
     * @param invoiceRecordsAudit 中心库月结审计
     * @return 结果
     */
    @Override
    public int updateInvoiceRecordsAudit(InvoiceRecordsAudit invoiceRecordsAudit)
    {
        return invoiceRecordsAuditMapper.updateInvoiceRecordsAudit(invoiceRecordsAudit);
    }

    /**
     * 批量删除中心库月结审计
     * 
     * @param ids 需要删除的中心库月结审计主键
     * @return 结果
     */
    @Override
    public int deleteInvoiceRecordsAuditByIds(Long[] ids)
    {
        return invoiceRecordsAuditMapper.deleteInvoiceRecordsAuditByIds(ids);
    }

    /**
     * 删除中心库月结审计信息
     * 
     * @param id 中心库月结审计主键
     * @return 结果
     */
    @Override
    public int deleteInvoiceRecordsAuditById(Long id)
    {
        return invoiceRecordsAuditMapper.deleteInvoiceRecordsAuditById(id);
    }

    @Override
    public List<Map<String, Object>> listWebInfo(String productName, String provide, String company, String status, String productGroup, String startTime) {
        return invoiceRecordsAuditMapper.listWebInfo(productName,provide,company,status,productGroup,startTime);
    }

    @Override
    public Double selectAllMoney(String provide, String startTime) {
        return invoiceRecordsAuditMapper.selectAllMoney(provide,startTime);
    }

    @Override
    public Double selectSumProductMoney(String provide, String startTime) {
        return invoiceRecordsAuditMapper.selectSumProductMoney(provide,startTime);
    }

    @Override
    public Integer deleteUpload(String time) {
        return invoiceRecordsAuditMapper.deleteUpload(time);
    }
}
